#!/usr/bin/python
# Copyright 2015 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import dbus
import flimflam
import sys

if len(sys.argv) < 2:
  print "Usage: %s <device_claimer> <device_name>" % (sys.argv[0])
  sys.exit(1)

bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object("org.chromium.flimflam", "/"),
                                        "org.chromium.flimflam.Manager")
print manager.ClaimInterface(sys.argv[1], sys.argv[2])
